﻿//Copyright (c) Microsoft Corporation.  All rights reserved.

namespace Microsoft.Ted.Wacel.Redis
{
    public class CompressedCircularBuffer: Base.CompressedCircularBuffer
    {
        public CompressedCircularBuffer(string name, long size, string hostName, int port = 6379, int batchSize = 1, bool avoidDuplicatedRead = true, string password = null)
            : base(name, size,
             new RedisCacheProvider(new BookSleeve.RedisConnection(hostName, port, allowAdmin: true, password:password), name) { Configuration = new RedisConfiguration() { WriteBatchSize = batchSize } },
                    new RedisLockProvider(new BookSleeve.RedisConnection(hostName, port, allowAdmin: true, password:password), name + ":lock"), avoidDuplicatedRead)
        {

        }
    }
}
